import {get,post} from '../../http';

// 宿舍类型
export function BaDormitoryType() {
	return {
		/**
		 * 增加宿舍类型
		 * @param {*} params 
		 * @returns 
		 */
		 adddormitoryType: (params) => {
			return post({
				url: '/hr/dormitory-type/addDormitoryType',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改宿舍类型
		 * @param {*} params 
		 * @returns 
		 */
		updateDormitoryType: (params) => {
			return post({
				url: '/hr/dormitory-type/updateDormitoryType',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取生效的宿舍类型
		 * @returns 
		 */
		getAllActiveBaDormitoryType: () => {
			return get({
				url: '/hr/dormitory-type/getAllActiveBaDormitoryType',
				method: 'get',
			});
		},
            /**
             * 获取所有宿舍类型
             * @param {*} params 
             * @returns 
             */
			 getBaDormitoryTypeList: (params) => {
                return post({	
                    url: '/hr/dormitory-type/getDormitoryTypelist',
                    method: 'post',
                    data: params,
                });
            }
        }
}


// 设备类型
export function BaEquipmentType() {
	return {
		/**
		 * 增加设备类型
		 * @param {*} params 
		 * @returns 
		 */
		 addBaEquipmentType: (params) => {
			return post({
				url: '/hr/equipment-type/addBaEquipmentType',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改设备类型
		 * @param {*} params 
		 * @returns 
		 */
		updateBaEquipmentType: (params) => {
			return post({
				url: '/hr/equipment-type/updateBaEquipmentType',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取生效的设备类型
		 * @returns 
		 */
		 getAllActiveEquipmentType: () => {
			return get({
				url: '/hr/equipment-type/getAllActiveEquipmentType',
				method: 'get',
			});
		},
            /**
             * 获取所有设备类型
             * @param {*} params 
             * @returns 
             */
			 getBaEquipmentTypeList: (params) => {
                return post({	
                    url: '/hr/equipment-type/getBaEquipmentTypeList',
                    method: 'post',
                    data: params,
                });
            }
        }
}

// 宿舍区域
export function BaDormitoryArea() {
	return {
/**
		 * 所有级别生效宿舍区域
		 * @param {*} params 
		 * @returns 
		 */
 	getUserActiveDormitoryArea: () => {
	return get({
		url: '/hr/dormitory-area/getUserActiveDormitoryArea',
		method: 'get'
	});
},

		/**
		 * 所有宿舍区域
		 * @param {*} params 
		 * @returns 
		 */
		 getAllDormitoryAreaList: (params) => {
			return post({
				url: '/hr/dormitory-area/getAllDormitoryAreaList',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 增加宿舍区域
		 * @param {*} params 
		 * @returns 
		 */
		 adddormitoryArea: (params) => {
			return post({
				url: '/hr/dormitory-area/addDormitoryArea',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改宿舍区域
		 * @param {*} params 
		 * @returns 
		 */
		 updateDormitoryArea: (params) => {
			return post({
				url: '/hr/dormitory-area/updateDormitoryArea',
				method: 'post',
				data: params,
			});
		},

            /**
             * 获取所有宿舍区域
             * @param {*} params 
             * @returns 
             */
			 getDormitoryAreaList: (params) => {
				return post({
					url: '/hr/dormitory-area/getDormitoryAreaList',
					method: 'post',
					data:params,
				});
			},

			 /**
             * 获取用户所管理的所有宿舍区域
             * @param {*} params 
             * @returns 
             */
			  getUserDormitoryAreaListByUserId: (params) => {
				return post({
					url: '/hr/dormitory-area/getUserDormitoryAreaListByUserId',
					method: 'post',
					data:params,
				});
			},

			
            /**
             * 获取当前宿舍区域的所有账号
             * @param {*} params 
             * @returns 
             */
			 getAccountListByareaId: (params) => {
                return post({	
                    url: '/hr/dormitory-area/getAccountListByareaId',
                    method: 'post',
                    data: params,
                });
            },

			/**
		 * 获取生效的宿舍区域
		 * @returns 
		 */
			 getAllActiveBaDormitoryArea: () => {
			return get({
				url: '/hr/dormitory-area/getAllActiveBaDormitoryArea',
				method: 'get',
			});
		},
        }
}


// 用户关联区域
export function DormitoryAreaAccount() {
	return {
	
			 /**
             * 获取用户所管理的所有宿舍区域
             * @param {*} params 
             * @returns 
             */
			  getUserDormitoryAreaListByUserId: (params) => {
				return post({
					url: '/hr/dormitory-area-account/getUserDormitoryAreaListByUserId',
					method: 'post',
					data:params,
				});
			},
			 /**
             * 修改
             * @param {*} params 
             * @returns 
             */
			  updateUserDormitoryArea: (params) => {
				return post({
					url: '/hr/dormitory-area-account/updateUserDormitoryArea',
					method: 'post',
					data:params,
				});
			},

        }
}

// 父级宿舍区域
export function BaDormitoryParentArea() {
	return {
			/**
		 * 获取生效的宿舍区域
		 * @returns 
		 */
			 getAllActiveBaDormitoryParentArea: () => {
			return get({
				url: '/hr/dormitory-area/getAllActiveBaDormitoryParentArea',
				method: 'get',
			});
		}
        }
}

// 检查项
export function checkItem() {
	return {
		/**
		 * 增加检查项
		 * @param {*} params 
		 * @returns 
		 */
		 addCheckItem: (params) => {
			return post({
				url: '/hr/check-item/addCheckItem',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改检查项
		 * @param {*} params 
		 * @returns 
		 */
		updateCheckItem: (params) => {
			return post({
				url: '/hr/check-item/updateCheckItem',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取生效的检查项
		 * @returns 
		 */
		getAllActiveCheckItem: () => {
			return get({
				url: '/hr/check-item/getAllActiveBaCheckItem',
				method: 'get',
			});
		},
            /**
             * 获取所有检查项
             * @param {*} params 
             * @returns 
             */
			 getCheckItemList: (params) => {
                return post({	
                    url: '/hr/check-item/getCheckItemslist',
                    method: 'post',
                    data: params,
                });
            }
        }
}

// 检查模板
export function checkTemplate() {
	return {
			/**
		 * 查询当前检查模板具有的模板项目
		 * @param {*} params 
		 * @returns 
		 */
			 queryCheckItemById: (params) => {
				return post({
					url: '/hr/check-template/queryCheckItemById',
					method: 'post',
					data: params,
				});
			},
		/**
		 * 增加检查模板
		 * @param {*} params 
		 * @returns 
		 */
		 addCheckTemplate: (params) => {
			return post({
				url: '/hr/check-template/addCheckTemplate',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改检查模板
		 * @param {*} params 
		 * @returns 
		 */
		 updateCheckTemplate: (params) => {
			return post({
				url: '/hr/check-template/updateCheckTemplate',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取生效的检查模板
		 * @returns 
		 */
		 getAllActiveBaCheckTemplate: () => {
			return get({
				url: '/hr/check-template/getAllActiveBaCheckTemplate',
				method: 'get',
			});
		},
            /**
             * 获取所有检查模板
             * @param {*} params 
             * @returns 
             */
			 getCheckTemplatelist: (params) => {
                return post({	
                    url: '/hr/check-template/getCheckTemplatelist',
                    method: 'post',
                    data: params,
                });
            }
        }
}


// 检查模板项目
export function checkTemplateItem() {
	return {
		/* 删除检查模板
		* @param {*} params 
		* @returns 
		*/
			delById: (params) => {
		   	return post({
			   url: '/hr/check-template-item/delById',
			   method: 'post',
			   data: params,
		   });
	   },
		/**
		 * 修改分值
		 * @param {*} params 
		 * @returns 
		 */
 			updateScore: (params) => {
			return post({
				url: '/hr/check-template-item/updateScore',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取模板对应的检查项并修改分值
		 * @param {*} params 
		 * @returns 
		 */
		 queryCheckItemByTemplateId: (params) => {
			return post({
				url: '/hr/check-template-item/getCheckItemListByTemplateIdPage',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 增加检查模板项目
		 * @param {*} params 
		 * @returns 
		 */
		 addChekcTemplateItem: (params) => {
			return post({
				url: '/hr/check-template-item/addChekcTemplateItem',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改检查模板项目
		 * @param {*} params 
		 * @returns 
		 */
		 updateChekcTemplateItemList: (params) => {
			return post({
				url: '/hr/check-template-item/updateChekcTemplateItemList',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取生效的检查模板项目
		 * @returns 
		 */
		 getAllActiveChekcTemplateItemList: () => {
			return get({
				url: '/hr/check-template-item/getAllActiveChekcTemplateItemList',
				method: 'get',
			});
		},
            /**
             * 获取所有检查模板项目
             * @param {*} params 
             * @returns 
             */
			 getChekcTemplateItemList: (params) => {
                return post({	
                    url: '/hr/check-template-item/getChekcTemplateItemList',
                    method: 'post',
                    data: params,
                });
            },

					/**
             * 通过区域id获取该区域的获取所有检查模板项目
             * @param {*} params 
             * @returns 
             */
					/**
		 * 通过区域id获取生效的宿舍
		 * @returns 
		 */
					 getSanitaryInspectionListByAreaId: (params) => {
						return post({
							url: '/hr/sanitary-inspection/getSanitaryInspectionListByAreaId',
							method: 'post',
							data: params,
						});
					},
					getCheckItemListByTemplateId: (params) => {
						return post({
							url: '/hr/check-template-item/getCheckItemListByTemplateId',
							method: 'post',
							data: params,
						});
					},


        }

}

// 水电费单价及补贴政策
export function subsidyRule() {
	return {

		/**
		 * 查询当前补贴的补贴规则
		 * @param {*} params 
		 * @returns 
		 */
		 getsubsidyRuleListBySubsidyId: (params) => {
			return post({
				url: '/hr/subsidy-rules/getsubsidyRuleListBySubsidyId',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 增加水电费单价及补贴政策
		 * @param {*} params 
		 * @returns 
		 */
		 addSubsidyRule: (params) => {
			return post({
				url: '/hr/ba-subsidy/addSubsidyRule',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改水电费单价及补贴政策
		 * @param {*} params 
		 * @returns 
		 */
		 updateSubsidyRule: (params) => {
			return post({
				url: '/hr/ba-subsidy/updateSubsidyRule',
				method: 'post',
				data: params,
			});
		},

            /**
             * 获取所有水电费单价及补贴政策
             * @param {*} params 
             * @returns 
             */
			 getDormitoryAreaList: (params) => {
                return post({	
                    url: '/hr/ba-subsidy/getDormitoryAreaList',
                    method: 'post',
                    data: params,
                });
            },

			
            /**
             * 获取当前宿舍区域的水电费单价及补贴政策
             * @param {*} params 
             * @returns 
             */
			 getSubsidyRuleListByDormitoryAreaId: (params) => {
                return post({	
                    url: '/hr/ba-subsidy/getSubsidyRuleListByDormitoryAreaId',
                    method: 'post',
                    data: params,
                });
            },

			
            /**
             * 查询当前补助的所有宿舍
             * @param {*} params 
             * @returns 
             */
			 getDormitoryByDormitoryAreaId: (params) => {
                return post({	
                    url: '/hr/ba-subsidy/getDormitoryByDormitoryAreaId',
                    method: 'post',
                    data: params,
                });
            }
		}
	}

	// 业务类型
export function ServiceClassification() {
	return {
		/**
		 * 增加业务类型
		 * @param {*} params 
		 * @returns 
		 */
		 addServiceClassification: (params) => {
			return post({
				url: '/hr/service-classification/addServiceClassification',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改业务类型
		 * @param {*} params 
		 * @returns 
		 */
		updateServiceClassification: (params) => {
			return post({
				url: '/hr/service-classification/updateServiceClassification',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取生效的业务类型
		 * @returns 
		 */
		 getAllActiveServiceClassification: () => {
			return get({
				url: '/hr/service-classification/getAllActiveServiceClassification',
				method: 'get',
			});
		},
            /**
             * 获取所有业务类型
             * @param {*} params 
             * @returns 
             */
			 getServiceClassificationList: (params) => {
                return post({	
                    url: '/hr/service-classification/getServiceClassificationList',
                    method: 'post',
                    data: params,
                });
            }
        }
}


// 补贴
export function subsidy() {
	return {
		/**
		 * 修改补贴宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 updateSubsidyDormitory: (params) => {
			return post({
				url: '/hr/ba-subsidy/updateSubsidyDormitory',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 新增补贴宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 addSubsidyDormitory: (params) => {
			return post({
				url: '/hr/ba-subsidy/addSubsidyDormitory',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 增加补贴类型
		 * @param {*} params 
		 * @returns 
		 */
		 addSubsidy: (params) => {
			return post({
				url: '/hr/ba-subsidy/addSubsidy',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改补贴类型
		 * @param {*} params 
		 * @returns 
		 */
		 updateSubsidy: (params) => {
			return post({
				url: '/hr/ba-subsidy/updateSubsidy',
				method: 'post',
				data: params,
			});
		},

            /**
             * 获取补贴类型
             * @param {*} params 
             * @returns 
             */
			 getsubsidyList: (params) => {
                return post({	
                    url: '/hr/ba-subsidy/getsubsidyList',
                    method: 'post',
                    data: params,
                });
            },
				/**
		 * 获取生效的补贴
		 * @returns 
		 */
				 getAllActiveSubsidyType: () => {
					return get({
						url: '/hr/ba-subsidy/getAllActiveSubsidyType',
						method: 'get',
					});
				},

		}
	}

	
// 补贴宿舍
export function subsidyDormitory() {
	return {
		/**
		 * 删除补贴宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 delSubsidyDormitory: (params) => {
			return post({
				url: '/hr/subsidy-dormitory/delSubsidyDormitory',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 修改补贴宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 updateSubsidyDormitory: (params) => {
			return post({
				url: '/hr/subsidy-dormitory/updateSubsidyDormitory',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 新增补贴宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 addSubsidyDormitory: (params) => {
			return post({
				url: '/hr/subsidy-dormitory/addSubsidyDormitory',
				method: 'post',
				data: params,
			});
		},
		   /**
             *  通过补贴id获取补贴宿舍列表分頁
             * @param {*} params 
             * @returns 
             */
			getSubsidyDormitoryPageBySubsidyId: (params) => {
                return post({	
                    url: '/hr/subsidy-dormitory/getSubsidyDormitoryPageBySubsidyId',
                    method: 'post',
                    data: params,
                });
            },
            /**
             *  通过补贴id获取补贴宿舍列表
             * @param {*} params 
             * @returns 
             */
			 getSubsidyDormitoryListBySubsidyId: (params) => {
                return post({	
                    url: '/hr/subsidy-dormitory/getSubsidyDormitoryListBySubsidyId',
                    method: 'post',
                    data: params,
                });
            },
				/**
		 * 获取生效的补贴
		 * @returns 
		 */
				 getAllActiveSubsidyType: () => {
					return get({
						url: '/hr/ba-subsidy/getAllActiveSubsidyType',
						method: 'get',
					});
				},

		}
	}